package cn.knightzz.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 
 * </p>
 *
 * @author knightzz
 * @since 2021-05-09
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="SysBuilding对象", description="")
public class SysBuilding implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "建筑物id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "辖区")
    private String area;

    @ApiModelProperty(value = "详细地址")
    private String address;

    @ApiModelProperty(value = "建筑物名称 xxx 网吧")
    private String name;

    @ApiModelProperty(value = "占地面积 单位: 平方米")
    private Integer acreage;

    @ApiModelProperty(value = "数据上传者id")
    private Long authorId;

    @ApiModelProperty(value = "数据上传者姓名")
    private String authorName;

    @ApiModelProperty(value = "文件id列表, 以逗号分割")
    private String files;

    @ApiModelProperty(value = "创建时间")
    // 插入时填充数据
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = "修改时间")
    // 插入和更新时填充数据
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @TableField(exist = false)
    @ApiModelProperty(value = "文件列表")
    private List<String> images;

    @TableField(exist = false)
    @ApiModelProperty(value = "文件id列表")
    private List<Long> fileList;

}
